<?php

namespace Nette\Http\Diagnostics;

use Nette;

?>
<style class="nette-debug">

	#nette-debug .nette-SessionPanel .nette-inner {
		width: 700px;
	}

	#nette-debug .nette-SessionPanel .nette-inner table {
		width: 100%;
	}

	#nette-debug .nette-SessionPanel-parameters pre {
		background: #FDF5CE;
		padding: .4em .7em;
		border: 1px dotted silver;
		overflow: auto;
	}

</style>

<div class="nette-SessionPanel">
	<h1>Session #<?php echo htmlspecialchars(session_id()) ?> (Lifetime: <?php echo htmlspecialchars(ini_get('session.cookie_lifetime')); ?>)</h1>

	<div class="nette-inner">
		<?php if (empty($_SESSION)):?>
		<p><i>empty</i></p>
		<?php else: ?>
		<table>
		<?php
		foreach ($_SESSION as $k => $v) {
			if ($k === '__NF') {
				$k = 'Nette Session'; $v = isset($v['DATA']) ? $v['DATA'] : NULL;
			}
			echo '<tr><th>', htmlspecialchars($k), '</th><td>', Nette\Diagnostics\Dumper::toHtml($v), "</td></tr>\n";
		}?>
		</table>
		<?php endif ?>
	</div>
</div>
